﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Edge.Common.ComponentModel.Parameters;
using Edge.Common.Services;
using Edge.Common.Utils;
using Shop.Business.Domain.Catalog;
using Shop.Business.Domain.Customers;
using Shop.Web.AppCode;
using Action = Edge.Common.Web.Navigation.Action;

namespace Shop.Web
{
    public partial class CategoryTree : ShopBasePage
    {

//        [QueryParameter("action", IsRequired = false)]
//        public Action action = Action.View;
//
//        [QueryParameter("id", IsRequired = false)]
//        public int id;
        
        protected void Page_Load(object sender, EventArgs e)
        {
           if (!IsPostBack)
           {
               DataBind();
           }

            
        }

         private void DataBind()
         {
             ICollection<Category> dataSource = Locator.GetService<ICategoryManager>().GetCategories(null);
             rprCatalog.DataSource = dataSource;
             rprCatalog.DataBind();
         }

    }
}
